<a href="javascript:;" class="grid-row-view" data-toggle="modal" data-target="#product_spec_list{{ $id }}">
    <i class="fa fa-eye"></i>
</a>
<div class="modal fade" id="product_spec_list{{ $id }}" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width: 95%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <table id="specTable" class="table table-bordered">
                <thead>
                <tr>
                    <th scope="col">图片</th>
                    <th scope="col">名称</th>
                    <th scope="col">原价</th>
                    <th scope="col">优惠价格</th>
                    <th scope="col">库存</th>
                    <th scope="col">限购数量</th>
                    <th scope="col" class="text-center" style="width:20px;" onclick="addSpec()">
                        <button type="button" class="btn btn-success">
                            <span class="glyphicon glyphicon-plus"></span> 新增
                        </button>
                    </th>
                </tr>
                </thead>
                <tbody class="editSpecTbody">
                @foreach($specs as $v)
                    <tr>
                        <th scope="row" width="100">
                            @if(!empty($v->ps_avatar))
                            <img src="{{ fileIdToUrl($v->ps_avatar) }}" alt="{{ $v->ps_name }}" width="100"/>
                            @endif
                            <input type="hidden" class="psId" value="{{ $v->ps_id }}">
                        </th>
                        <th scope="row" width="200">
                            <input type="text" class="form-control" value="{{ $v->ps_name }}" maxlength="20">
                        </th>
                        <th scope="row" width="100">
                            <input type="text" class="form-control" value="{{ $v->ps_price_underlined }}" maxlength="9">
                        </th>
                        <th scope="row" width="100">
                            <input type="text" class="form-control" value="{{ $v->ps_price }}" maxlength="9">
                        </th>
                        <th scope="row" width="100">
                            <input type="text" class="form-control" value="{{ $v->ps_usable_stock }}" maxlength="9">
                        </th>
                        <th scope="row" width="100">
                            <input type="text" class="form-control" value="{{ $v->ps_buy_limit }}" maxlength="9">
                        </th>
                        <th scope="row" class="text-center" onclick="delSpec(this)">
                            <button type="button" class="btn btn-danger btn-group-sm" style="margin-left: 20px;">删除</button>
                        </th>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">提交</button>
            </div>
        </div>
    </div>
</div>
